package cn.rc.rcsystem.feign;

import cn.rc.rcsystem.fallback.UserServiceFallbackFactory;
import cn.rc.rcsystem.result.JSONResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@FeignClient(name="service-user",path = "/user",contextId = "userService",fallbackFactory = UserServiceFallbackFactory.class )
public interface UserService {
    @RequestMapping(value = "/phone/{phone}",method = RequestMethod.GET)
    JSONResult getPhone(@PathVariable("phone") Integer phone);
}
